﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <meta http-equiv="Access-Control-Allow-Origin" content="*"/>
    <link rel="Bookmark" href="/favicon.ico"/>
    <link rel="Shortcut Icon" href="/favicon.ico"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="lib/html5shiv.js"></script>
    <script type="text/javascript" src="lib/respond.min.js"></script>

    <![endif]-->
    <link href="/lib/layui-v2.2.5/css/layui.css" rel="stylesheet" type="text/css"/>
    <link href="/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css"/>
    <link href="/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" type="text/css"/>
    <link href="/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css"/>
    <!--[if IE 6]>
    <script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>用户列表接口</title>
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?66eb41787f05b9755f31623b0d2a8d6e";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>
<body>
<div class="ml-50 mr-50">
    <h3>接口文档</h3>
    <hr class="layui-bg-blue mb-10"/>

    <div id="post" class="layui-collapse">
        <div class="layui-colla-item">
            <h3 class="layui-colla-title layui-bg-green">请求URL</h3>
            <div id="url" class="layui-colla-content layui-show" th:text="${api.apiUrl}"></div>
        </div>
    </div>

    <div id="params" class="layui-collapse mt-10">
        <div class="layui-colla-item">
            <h2 class="layui-colla-title layui-bg-green">请求参数</h2>
            <div class="layui-colla-content">
                <table class="layui-table">
                    <colgroup>
                        <col width="150"/>
                        <col width="150"/>
                        <col width="150"/>
                        <col width="200"/>
                        <col/>
                        <col width="80"/>
                    </colgroup>
                    <thead>
                    <tr>
                        <th>参数</th>
                        <th>是否必填</th>
                        <th>类型</th>
                        <th>值</th>
                        <th>说明</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody id="content">
                    <script id="test" type="text/html">
                        {{each list}}
                        <tr>
                            <td>{{$value.paramName}}</td>
                            <td>{{$value.paramType}}</td>
                            <td>{{$value.paramBoolean}}</td>
                            <td><input type="text" name="title" autocomplete="off" class="layui-input"/></td>
                            <td>{{$value.paramRemark}}</td>
                            <td>
                                <a class="layui-icon" title="编辑">&#xe642;</a>
                                <a class="layui-icon" title="删除">&#xe640;</a>
                            </td>
                        </tr>
                        {{/each}}
                    </script>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <form class="layui-form" action="">
        <div id="type" class="layui-collapse  mt-10">
            <div class="layui-colla-item">
                <!--<h3 class="layui-colla-title layui-bg-green">请求类型</h3>-->
                <!--<div class="layui-colla-content" style="width:200px;" >-->
                <div class="" style="width:200px;">
                    <select id="sel-type" lay-verify="">
                        <option value="POST" th:disabled="${api.apiRequestType=='GET'}?disabled">POST</option>
                        <option value="GET" th:disabled="${api.apiRequestType=='POST'}?disabled">GET</option>
                    </select>
                </div>
            </div>
        </div>
    </form>

    <div id="result" class="layui-collapse  mt-10 layui-row">
        <div class="layui-colla-item layui-col-md5">
            <h2 class="layui-colla-title layui-bg-green">请求返回结果</h2>
            <div class="layui-colla-content layui-show">
                <pre id="formatJson" class="layui-code" lay-filter="test2"></pre>
            </div>
        </div>

        <div class="layui-colla-item layui-col-md5 ml-50">
            <h2 class="layui-colla-title layui-bg-green">返回结果示例</h2>
            <div class="layui-colla-content layui-show">
                <pre id="formatJsonDemo" class="layui-code"></pre>
            </div>
        </div>
    </div>


    <h3>模拟请求</h3>
    <hr class="layui-bg-blue mb-10"/>
    <div id="try">
        <button class="layui-btn layui-btn-normal" onclick="test();">亲自试试</button>
    </div>
    <input id="hid_id" type="hidden" th:value="${api.id}"/>
    <input id="hid_result" type="hidden" th:value="${api.apiResult}"/>
</div>
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<!--<script type="text/javascript" src="/lib/jsonFormater/jsonFormater.js"></script>-->
<script type="text/javascript" src="/lib/layui-v2.2.5/layui.all.js"></script>
<script type="text/javascript" src="/js/template.js"></script>
<script type="text/javascript" src="/js/public.js"></script>
<script type="text/javascript" src="/js/maputil.js"></script>
<script type="text/javascript" src="/js/api-show.js"></script>
</body>
</html>